1. Field of the Invention
The present invention relates to a method and a device for compressing and expanding image data as well as a printer.
2. Description of the Prior Art
In general, a print system including a computer and a printer is used. As such a print system, there is a type in which a computer side performs image processing such as a pseudo gradation process on image data to be printed so that a printer side does not need to perform a special process on the image data received from the computer and prints the image on a paper sheet just by using the image data.
In addition, the computer side performs data compression so as to reduce quantity of image data transmitted from the computer to the printer. There are proposed various compression methods including a method of compressing image data by a pseudo gradation process (see Japanese unexamined patent publication No. 6-152986).
Usually, in order to compress and expand image data efficiently, it is preferable to utilize a two-dimensional relationship of the image. Therefore, an image (image data) is divided into a plurality of blocks in a line direction that is a main scan direction and in a sub scan direction that is orthogonal to the line direction. Then, densities of all pixels within each of the blocks are represented by one representative value. In this case, there are proposed various compression methods in which additional information is added for a part that cannot be expressed only by the representative value, so that the representative value and the additional information are used by the block for expressing the image.
The image data (compressed data) that are compressed by the conventional method for each block will be expanded for each block, i.e., by the block.
However, in order to print or display the expanded image, the image data must be retrieved for each line. The above-mentioned conventional compression method and expansion method need two-sets of memories having the same size of line numbers as the size in the sub scan direction of the block, and therefore there is a problem that a large number of memory capacity is required for performing the expansion process.
More specifically, since the conventional compressed data include the representative values and the additional information generated by the block, the expansion process must be also performed by the block. Therefore, a working memory for expansion is necessary for lines whose number is the same as the number of lines in a block, and an output buffer memory for transferring the expanded image data is necessary for lines whose number is the same as those of the working memory.
For example, if the block includes four lines, memories for eight lines are necessary, which include working memories for four lines and output buffer memories for four lines, as shown in FIG. 29. In FIG. 29, image data of each block are expanded sequentially based on the representative value and the additional information, and they are written from the head of the working memory. When the image data are expanded in the entire area of the working memory, they are transferred to the output buffer memory, and the next leading block is expanded and written in the working memory followed by other blocks sequentially. The transferred image data are read out from the output buffer memory by the line sequentially, and light emission intensity of a laser diode is controlled in accordance with the read data. Then, in an electrophotographic print engine, an image is formed when a surface of a photoconductor drum or the like is scanned by a laser beam with intensity modulation.
As described above, a large memory capacity is necessary for the expansion process in the conventional method. Therefore, when a circuit for the expansion process is made of an ASIC and incorporated in equipment, the ASIC cannot be realized easily. Further, if the memories are disposed outside the ASIC, connection pins are necessary between the memories and the ASIC, which causes a disadvantage in cost as well as a difficulty of high speed access to the memories resulting in a difficulty of high speed process of the entire system.